package com.itheima.edu.info.manager.entry;

import com.itheima.edu.info.manager.controller.StudentController;
import com.itheima.edu.info.manager.dao.impl.StudentDaoImpl;

import java.text.ParseException;
import java.util.Scanner;

/**
 * @author daiweiyuan
 */
public class Entry {
    public static void main(String[] args) throws ParseException {
        StudentController controller = new StudentController();

        Scanner sc = new Scanner(System.in);
        boolean flag = true;

        while (flag) {
            System.out.println("1-新增学生");
            System.out.println("2-修改学生");
            System.out.println("3-删除学生");
            System.out.println("4-查看学生");
            System.out.println("0-退出");

            System.out.println("请输入");

            String ch = sc.next();

            switch (ch) {
                case "1":
                    controller.addStudent();
                    break;
                case "2":
                    System.out.println("2-修改学生");
                    break;
                case "3":
                    System.out.println("3-删除学生");
                    break;
                case "4":
                    controller.findAllStudent();
                    break;
                case "0":
                    System.out.println("0-退出");
                    flag = false;
                    break;
                default:
                    System.out.println("输入有误");
                    break;
            }
        }


    }
}
